package com.ccz.demo.design.proxy.demo1.dynamic;

import java.lang.reflect.Proxy;

/**
 * @ClassName ProxyFactory
 * @Author caihaoyun
 * @Date 2020/4/13
 * @Version V1.0
 **/
public class ProxyFactory {

    public static Object getDnyProxy(Object target) {
        DynamicProxyLawyer handler = new DynamicProxyLawyer(target);
        return Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), handler);
    }

}
